package org.minos.edit.model
{
	import org.minos.edit.view.components.interfaces.IFile;
	import org.puremvc.as3.patterns.proxy.Proxy;
	
	/**
	 * ...
	 * @author ...
	 */
	public class ClearProxy extends Proxy
	{
		public static const NAME : String = "ClearProxy";
		
		private var _list : Vector.<IFile>;
		
		public function ClearProxy()
		{
			_list = new Vector.<IFile>();
			super( NAME , _list );
		}
		
		public function addComponent( f : IFile ) : void
		{
			if ( _list.indexOf( f ) == -1 )
				_list.push( f );
		}
		
		public function clear() : void
		{
			for each ( var i : IFile in _list )
			{
				if ( i )
					i.clear();
			}
		}
	
	}

}